import config from "@/config"
import http from "@/utils/request"

export default {
	addOrUpdateTask: {
		url: `${config.API_URL}/v2/sys-job/saveorupdate`,
		name: "添加任务",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
    getJobEnumList:{
        url: `${config.API_URL}/v2/sys-job/getjobenum`,
		name: "获取任务类型",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
    },
	getJobList:{
		url: `${config.API_URL}/v2/sys-job/page`,
		name: "获取任务列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	getAllJob:{
		url: `${config.API_URL}/v2/sys-job/getall`,
		name: "获取所有任务列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	execOne:{
		url: `${config.API_URL}/v2/sys-job/execone`,
		name: "执行任务一次",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	}
}